package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface CommentApi {

    //发布评论，并获取评论数量
    Integer save(Comment comment1);

    //分页查询评论
    List<Comment> findComments(String movementId, CommentType commentType, Integer page, Integer pagesize);

    //判断comment数据是否存在
    Boolean hasComment(String movementId, Long userId, CommentType commentType);

    //删除comment数据
    Integer delete(Comment comment);

    //按页查看动态评论 --后台系统
    PageResult findCommentByPage(String messageID, CommentType comment, Integer page, Integer pagesize);

    //对评论点赞
    Integer likeComment(String commentId);

    //取消对评论点赞
    Integer dislikeComment(String commentId);

    //保存视频的评论
    void saveVideoComments(Comment comment);

    //根据视频id查找评论
    List<Comment> findCommentByVideoId(String id, CommentType commentType, Integer page, Integer pagesize);
}
